// cResolveUserDlg.cpp : implementation file
//

#include "stdafx.h"
#include "qpmig.h"
#include "cResolveUserDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// cResolveUserDlg dialog


cResolveUserDlg::cResolveUserDlg(LPCSTR pEMail,LPCSTR pAccount,LPCSTR pName,CWnd* pParent /*=NULL*/)
	: CDialog(cResolveUserDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(cResolveUserDlg)
	m_strEMail = pEMail;
	m_strDomainAccount = pAccount;
	m_strNotesName = pName;
	//}}AFX_DATA_INIT
}


void cResolveUserDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(cResolveUserDlg)
	DDX_Text(pDX, IDC_EDIT1, m_strEMail);
	DDX_Text(pDX, IDC_EDIT2, m_strDomainAccount);
	DDX_Text(pDX, IDC_EDIT3, m_strNotesName);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(cResolveUserDlg, CDialog)
	//{{AFX_MSG_MAP(cResolveUserDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// cResolveUserDlg message handlers

void cResolveUserDlg::OnOK() 
{
	UpdateData();
	m_strDomainAccount.TrimLeft();
	if(m_strDomainAccount.IsEmpty())
		{
			if(IDYES==AfxMessageBox("Do you want to leave the domain account empty?", MB_YESNO|MB_ICONQUESTION))
				{
					CDialog::OnCancel();
				}
			else
				return;

		}
	CDialog::OnOK();
	
}

